﻿package tk.mystudio.permission.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "role_resource")
public class RoleResource implements Serializable {
	
	private static final long serialVersionUID = 2438602695333868816L;

	/**
	 * 角色编号
	 */
	@Id
	@Column(name = "role_id", columnDefinition = "int")
	protected Integer roleId;
	
	/**
	 * 资源编号
	 */
	@Id
	@Column(name = "resource_id", columnDefinition = "int")
	protected Integer resourceId;

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getResourceId() {
		return resourceId;
	}

	public void setResourceId(Integer resourceId) {
		this.resourceId = resourceId;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("RoleResource [roleId=");
		builder.append(roleId);
		builder.append(", resourceId=");
		builder.append(resourceId);
		builder.append("]");
		return builder.toString();
	}

}
